{% extends "templates/base.phtml" %}
{%block content%}
<div class="row">
    <div class="col-md-12">

        <form action="/admin/myinfo" method="post" class="form-horizontal">
            <input type="hidden" name="<?php echo $this->security->getTokenKey() ?>" value="<?php echo $this->security->getToken() ?>"/>
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab-first" role="tab" data-toggle="tab">资料设置</a></li>
<!--                    <li><a href="/admin/myinfo/recharge/" role="tab">积分</a></li>-->
                </ul>
                <div class="panel-body tab-content">
                    <div class="tab-pane active" id="tab-first">

                        {% for title,variable in profile %}
                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{title}}</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-unlock-alt"></span></span>
                                    <input name="{{variable}}" class="form-control"  value="{% if userprofile[variable] is defined %}{{userprofile[variable]}}{% endif %}">
                                </div>
                            </div>
                        </div>
                        {% endfor %}
                    </div>
                </div>
                <div class="panel-footer">
                    <button class="btn btn-primary pull-right">提交 <span class="fa fa-floppy-o fa-right"></span></button>
                </div>
            </div>
        </form>

    </div>
</div>
{%endblock%}